package com.pet_service.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import java.util.List;

import com.pet_service.enums.TUserRegisterTypeStatus;
import com.pet_service.enums.TUserStatus;
import lombok.Data;

/**
 * 用户表
 * @TableName user
 */
@TableName(value ="user")
@Data
public class User extends BaseEntity {
    /**
     * 系统账号
     */
    @TableField(value = "username")
    private String username;

    /**
     * 密码（加密）
     */
    @TableField(value = "password")
    private String password;

    /**
     * 手机号
     */
    @TableField(value = "phone")
    private String phone;

    /**
     * 注册类型
     */
    @TableField(value = "register_type")
    private TUserRegisterTypeStatus register_type;

    /**
     * QQ标识
     */
    @TableField(value = "qq_openid")
    private String qq_openid;

    /**
     * 微信标识
     */
    @TableField(value = "wechat_openid")
    private String wechat_openid;

    /**
     * 昵称
     */
    @TableField(value = "nickname")
    private String nickname;

    /**
     * 真实姓名
     */
    @TableField(value = "real_name")
    private String real_name;

    /**
     * 0-禁用；1-正常
     */
    @TableField(value = "status")
    private TUserStatus status;

    /**
     * 用户头像URL
     */
    @TableField(value = "avatar_url")
    private String avatar_url;

    /**
     * 最后登录时间
     */
    @TableField(value = "login_date")
    private Date login_date;

    /**
     * 服务资质URL
     */
    @TableField(value = "qualification_url")
    private String qualification_url;


    /**
     * 医院ID（用于标识服务人员所属医院）
     */
    @TableField(value = "hospital_id")
    private Integer hospital_id;

    /**
     * 性别
     */
    @TableField(value = "gender")
    private String gender;

    //此属性不映射到数据库
    @TableField(exist = false)
    private List<Role> roleList;
}